n=32;
i_arr = 0:n-1;
fft_coeff = exp(-2*pi*i*i_arr/n);

dataIn = n:-1:1;

metrix_pow = int16(zeros(n,n));

for ir=1:n
    for ic = 1:n
       metrix_pow(ir,ic) = (ir-1)*(ic-1);
    end
end

metrix_pow1 = mod(metrix_pow,n);

fft_result = zeros(1,n);

for ir = 1:n    
    for ic = 1:n
        fft_result(ir) = fft_coeff(metrix_pow1(ir,ic) + 1)*dataIn(ic) + fft_result(ir);
    end
end

%metrix_coeff = zeros(n,n);

